#include <iostream>
using namespace std;

int fnc(int n)
{
    if (n == 1)
    {
        return 1;
    }
    n = n * fnc(n - 1);
    return n;
}

int main()
{
    cout << "输入一个正整数:" << endl;
    int n;
    cin >> n;
    cout << fnc(n) << endl;
    return 0;
}